<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>事件监听</title>
    <script src="../vue.js"></script>
</head>
<div id="app">
    <button v-on:click="count+=Math.random()">随机数</button>
    <P>自动生成的随机数是{{count}}</P>
</div>
<script>
var vm =new Vue({
    el:'#app',
    data: {
        count: 0
    }
})
</script>
</body>
</html>